package cn.edu.fzu.homemaking.api;

import cn.edu.fzu.homemaking.domain.enums.CompanyStatusEnum;
import cn.edu.fzu.homemaking.domain.enums.LabelStatusEnum;
import cn.edu.fzu.homemaking.web.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author jiebin
 * @Date 2023/4/7
 */
@FeignClient(name="sys")
public interface SysApi {

    @GetMapping("/api/sys/company/list")
    Result companyList(@RequestParam("provinceId") Long provinceId, @RequestParam("areaId") Long areaId, @RequestParam("cityId") Long cityId,
                       @RequestParam("businessLicense") String businessLicense, @RequestParam("contact") String contact,
                       @RequestParam("creditCode") String creditCode, @RequestParam("legalPerson") String legalPerson,
                       @RequestParam("name") String name, @RequestParam("phone") String phone,@RequestParam("labelId") Long labelId,
                       @RequestParam("status") CompanyStatusEnum status, @RequestParam("pageNum") Integer pageNum,
                       @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/api/sys/label/list")
    Result listLabels(@RequestParam("name") String name, @RequestParam("status") LabelStatusEnum status,
                      @RequestParam("pageNum") Integer pageNum, @RequestParam("pageSize") Integer pageSize);

    @GetMapping("/api/sys/listProvince")
    Result listProvince();

    @GetMapping("/api/sys/listCity")
    Result listCity(@RequestParam("provinceId") Long provinceId);

    @GetMapping("/api/sys/listArea")
    Result listArea(@RequestParam("cityId") Long cityId);

    @GetMapping("/api/sys/getAreaById")
    Result getAreaById(@RequestParam("areaId") Long areaId);
}
